<template>
	<view>
		<uni-list>
			<uni-list-item :showArrow="true" title="检查更新" 
			@click="onNavTo('')"/>
			<uni-list-item :showArrow="true" title="关于" 
			@click="onNavTo('./about')"/>
		</uni-list>
		<uni-list>
			<view class="l-exit" @click="onSelfExit">
				<text>退出登录</text>
			</view>
		</uni-list>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		methods:{
			onNavTo(url){
				if(url.trim().length>0){
					uni.navigateTo({
						url:url
					})
				}else{
					uni.showToast({
						title:"正在开发中..."
					})
				}
			},
			onSelfExit(e){
				// 清空相应缓存
				uni.removeStorageSync("userLoginData");
                //  清空相应token值
				uni.removeStorageSync("token");
				//  清空相应用户值
				uni.removeStorageSync("userLoginInfo");
				//  清空相应聊天对象列表
				uni.removeStorageSync("msgUserList");
				//  清空相应聊天数据
				uni.removeStorageSync("msgList");
				//  清空相应权限数据
				uni.removeStorageSync("userAuthInfo");
				//  清空相应聊天对象
				uni.removeStorageSync("fromUserName");
				//  清空所选择用户
				uni.removeStorageSync("selectedUser");
				// 跳转到登录页
				uni.navigateTo({
					url:"../../../login/login"
				})
				
			}
		}
	}
</script>

<style>
	page{
		background-color: #F1F5F6;
	}
	.l-exit{
		display: flex;
		justify-content: center;
		padding: 20rpx;
		font-size: 30rpx;
	}
</style>
